
import { MoneyEchartsComponent } from './components/HuoMoney/MoneyEcharts/MoneyEcharts.component';
import { HuoMoneyComponent } from './components/HuoMoney/HuoMoney.component';
import { HuoCusWaybillComponent } from './components/HuoCustmp/HuoCusWaybill/HuoCusWaybill.component';
import { HuoCusProComponent } from './components/HuoCustmp/HuoCusPro/HuoCusPro.component';
import { HuoCusCarComponent } from './components/HuoCustmp/HuoCusCar/HuoCusCar.component';
import { HuoMainTmpComponent } from './components/HuoMainTmp/HuoMainTmp.component';
import { Routes, RouterModule } from '@angular/router';
import { LayoutComponent } from '../layout/layout.component';
import { HuoCustmpComponent } from './components/HuoCustmp/HuoCustmp.component';
import { MoneyCheckComponent } from './components/HuoMoney/MoneyCheck/MoneyCheck.component';

import { HuoMesstmpComponent } from './components/HuoMesstmp/HuoMesstmp.component';
import { MessCusAdminComponent } from './components/HuoMesstmp/MessCusAdmin/MessCusAdmin.component';
import { MessCusInfoComponent } from './components/HuoMesstmp/MessCusInfo/MessCusInfo.component';
import { MesshuoyunAdminComponent } from './components/HuoMesstmp/MesshuoyunAdmin/MesshuoyunAdmin.component';
import { MesshuoyunAdminDialogComponent } from './components/HuoMesstmp/MesshuoyunAdminDialog/MesshuoyunAdminDialog.component';
import { MessDriverComponent } from './components/HuoMesstmp/MessDriver/MessDriver.component';
import { MessCusInfoDialogComponent } from './components/HuoMesstmp/MessCusInfoDialog/MessCusInfoDialog.component';
import { MessDriverInfoComponent } from './components/HuoMesstmp/MessDriverInfo/MessDriverInfo.component';

import { HuoSettmpComponent } from './components/HuoSettmp/HuoSettmp.component';
import { SetAdminComponent } from './components/HuoSettmp/SetAdmin/SetAdmin.component';
import { SetCarComponent } from './components/HuoSettmp/SetCar/SetCar.component';
import { SetUserComponent } from './components/HuoSettmp/SetUser/SetUser.component';
import { SetSystemComponent } from './components/HuoSettmp/SetSystem/SetSystem.component';
import { UserLoginComponent } from '../user/userLogin/userLogin.component';

import { HuoRestmpComponent } from './components/HuoRestmp/HuoRestmp.component';
import { ResCarlistComponent } from './components/HuoRestmp/ResCarlist/ResCarlist.component';
import { ResCarInfoComponent } from './components/HuoRestmp/ResCarInfo/ResCarInfo.component';
import { ResOilcardComponent } from './components/HuoRestmp/ResOilcard/ResOilcard.component';
import { ResOilcardInfoComponent } from './components/HuoRestmp/ResOilcardInfo/ResOilcardInfo.component';
import { ResOilcardDiaComponent } from './components/HuoRestmp/ResOilcardDia/ResOilcardDia.component';
import { ResCarDialogComponent } from './components/HuoRestmp/ResCarDialog/ResCarDialog.component';
import { HuoCusCarInfoComponent } from './components/HuoCustmp/HuoCusCarInfo/HuoCusCarInfo.component';
import { HuoCusProInfoComponent } from './components/HuoCustmp/HuoCusProInfo/HuoCusProInfo.component';
import { HuoCusProDiaComponent } from './components/HuoCustmp/HuoCusProDia/HuoCusProDia.component';
import { SetUserDiaComponent } from './components/HuoSettmp/SetUserDia/SetUserDia.component';
import { HuoCusWaybinfoComponent } from './components/HuoCustmp/HuoCusWaybinfo/HuoCusWaybinfo.component';
import { SetUserInfoComponent } from './components/HuoSettmp/setUserInfo/setUserInfo.component';

export const routes: Routes = [
   {
        path: '',
        redirectTo: 'userlogin',
        pathMatch: 'full' 
    },
      {
        path:'userlogin',
        component: UserLoginComponent
      },
    {
        path: 'layout',
        component: LayoutComponent,
        children: [
            { path: '', redirectTo: 'main', pathMatch: 'full' },
            { path:'main', component: HuoMainTmpComponent},
            { path:'cus', 
              component: HuoCustmpComponent,
              children:[
                { path: '', redirectTo: 'pro', pathMatch: 'full'},
                { path:'pro', component: HuoCusProComponent},
                { path:'car', component: HuoCusCarComponent},
                { path:'waybill', component: HuoCusWaybillComponent},
                { path:'wayinfo/:id', component: HuoCusWaybinfoComponent},
                { path:'wayinfo/:id/:check', component: HuoCusWaybinfoComponent},
                { path:'carinfo/:id', component: HuoCusCarInfoComponent},
                { path:'carinfo/:id/:edit', component: HuoCusCarInfoComponent},
                { path:'proinfo/:id', component: HuoCusProInfoComponent},
                { path:'prodia/:id', component: HuoCusProDiaComponent},
              ]
            },
            { path:'fina', 
              component: HuoMoneyComponent,
              children:[
                { path: '', redirectTo: 'check', pathMatch: 'full'},
                { path:'check', component: MoneyCheckComponent},
                { path:'echarts', component: MoneyEchartsComponent},
              ]
            },
            { path:'mess', 
              component: HuoMesstmpComponent,
              children:[
                { path: '', redirectTo: 'huoyun', pathMatch: 'full'},
                { path:'cusinfo', component: MessCusInfoComponent},
                { path:'cusinfo/:id', component: MessCusAdminComponent},
                { path:'cusinfo/:id/:sec', component: MessCusAdminComponent},                
                { path:'huoyun', component: MesshuoyunAdminComponent}, 
                { path:'huoyun-new', component: MesshuoyunAdminDialogComponent},
                { path:'huoyun-new/:id', component: MesshuoyunAdminDialogComponent},
                { path:'huoyun-new/:id/:edit', component: MesshuoyunAdminDialogComponent},
                { path:'driver', component: MessDriverComponent},
                { path:'driverinfo/:id', component: MessDriverInfoComponent},
                { path:'driverinfo/:id/:edit', component: MessDriverInfoComponent},
                { path:'cusinfo-new', component: MessCusInfoDialogComponent},
                { path:'cusinfo-new/:id', component: MessCusInfoDialogComponent},
              ]
            },
             { path:'res', 
              component: HuoRestmpComponent,
              children:[
                { path: '', redirectTo: 'carlist', pathMatch: 'full'},
                { path:'carlist', component: ResCarlistComponent},
                { path:'carinfo/:id', component: ResCarInfoComponent},
                { path:'car-new', component: ResCarDialogComponent},
                { path:'car-edit/:id', component: ResCarDialogComponent},
                { path:'oil', component: ResOilcardComponent},
                { path:'oilinfo/:id', component: ResOilcardInfoComponent},
                { path:'oil-new/:id/:type', component: ResOilcardDiaComponent},
              ]
            },
            { path:'set', 
              component: HuoSettmpComponent,
              children:[
                { path: '', redirectTo: 'user', pathMatch: 'full'},
                { path:'user', component: SetUserComponent},
                { path:'userdia', component: SetUserDiaComponent},
                { path:'userdia/:id', component: SetUserDiaComponent},
                { path:'userinfo/:id', component: SetUserInfoComponent},
                { path:'admin', component: SetAdminComponent},
                { path:'car', component: SetCarComponent},
                { path:'system', component: SetSystemComponent},
              ]
            }
        ] 
    }
];

